home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / Feelin021015 / Examples / Notify.e < prev    next >
Text File  |  2002-10-28  |  3KB  |  124 lines

  1. OPT PREPROCESS
  2.  
  3. MODULE 'feelin','libraries/feelin'
  4.  
  5. PROC main()
  6.    DEF c,w,g,
  7.        gl,gr,gc,
  8.        pl1,pl2,pr1,pr2,pc,pcl,pcr,tog
  9.  
  10.    IF feelinbase := OpenLibrary('feelin.library',FV_VERSION)
  11.       c := ClientObject,
  12.          Child, w := WindowObject, FA_Window_Title,'Feelin : Notify',
  13.             Child, g := HGroup, FA_MinWidth,200,
  14.                Child, gl  := vGauge(0,100,0),
  15.                Child, pl1 := vProp(0,10,111),
  16.                Child, pl2 := vProp(0,10,111),
  17.  
  18.                Child, VGroup,
  19.                   Child, pc := hProp(0,10,111),
  20.  
  21.                   Child, HGroup,
  22.                      Child, pcl := hProp(0,10,111),
  23.                      Child, pcr := hProp(0,10,111),
  24.                   End,
  25.  
  26.                   Child, gc := hGauge(0,100,0),
  27.  
  28.                   Child, HGroup,
  29.                      Child, TextObject,         FA_Fixed,TRUE, DontChain, FA_Text, 'Toggle gauges look', FA_Text_VCenter,TRUE, End,
  30.                      Child, tog := ImageObject, FA_Fixed,TRUE, InputToggle, FA_Image,'3:CheckMark.fb0', End,
  31.                   End,
  32.                End,
  33.  
  34.                Child, pr2 := vProp(0,10,111),
  35.                Child, pr1 := vProp(0,10,111),
  36.                Child, gr  := vGauge(0,100,0),
  37.             End,
  38.          End,
  39.       End
  40.  
  41.       IF c
  42.          F_DoA(pcl,FM_Notify,[FA_Prop_First,FV_Notify_Always,pl1,3,FM_Set,FA_Prop_First,FV_Notify_Value])
  43.          F_DoA(pcl,FM_Notify,[FA_Prop_First,FV_Notify_Always,pl2,3,FM_Set,FA_Prop_First,FV_Notify_Value])
  44.          F_DoA(pcr,FM_Notify,[FA_Prop_First,FV_Notify_Always,pr2,3,FM_Set,FA_Prop_First,FV_Notify_Value])
  45.          F_DoA(pcr,FM_Notify,[FA_Prop_First,FV_Notify_Always,pr1,3,FM_Set,FA_Prop_First,FV_Notify_Value])
  46.  
  47.          F_DoA(pc,FM_Notify,[FA_Prop_First   ,FV_Notify_Always,gc,3,FM_Set,FA_Numeric_Value,FV_Notify_Value])
  48.          F_DoA(gc,FM_Notify,[FA_Numeric_Value,FV_Notify_Always,gl,3,FM_Set,FA_Numeric_Value,FV_Notify_Value])
  49.          F_DoA(gc,FM_Notify,[FA_Numeric_Value,FV_Notify_Always,gr,3,FM_Set,FA_Numeric_Value,FV_Notify_Value])
  50.          F_DoA(gl,FM_Notify,[FA_Numeric_Value,FV_Notify_Always,pcl,3,FM_Set,FA_Prop_First,FV_Notify_Value])
  51.          F_DoA(gr,FM_Notify,[FA_Numeric_Value,FV_Notify_Always,pcr,3,FM_Set,FA_Prop_First,FV_Notify_Value])
  52.  
  53.          F_DoA(tog,FM_Notify,[FA_Selected,FV_Notify_Always,g,5,FM_Set,FA_Gauge_Simple,FV_Notify_Value,FA_Group_Forward,TRUE])
  54.  
  55.          F_DoA(w,FM_Notify,[FA_Window_CloseRequest,TRUE,FV_Notify_Client,2,FM_Client_ReturnID,FV_Client_Quit])
  56.          F_Set(w,FA_Window_Open,TRUE)
  57.  
  58.          F_DoA(c,FM_Client_Run,NIL)
  59.  
  60.          F_DisposeObj(c)
  61.       ENDIF
  62.  
  63.       CloseLibrary(feelinbase)
  64.    ELSE
  65.       WriteF('Unable to open feelin.library\n')
  66.    ENDIF
  67. ENDPROC
  68.  
  69. PROC vProp(first,visible,entries)
  70.    RETURN PropObject,
  71.           PropFrame,
  72.           PropBack,
  73.  
  74.           FA_FixWidth,20,
  75.  
  76.           FA_Prop_Entries, entries,
  77.           FA_Prop_First,   first,
  78.           FA_Prop_Visible, visible,
  79.  
  80.           End
  81. ENDPROC
  82. PROC hProp(first,visible,entries)
  83.    RETURN   PropObject,
  84.             PropFrame,
  85.             PropBack,
  86.  
  87.             FA_Horizontal,TRUE,
  88.             FA_FixedHeight,TRUE,
  89.             FA_MinWidth,50,
  90.  
  91.             FA_Prop_Entries,entries,
  92.             FA_Prop_First, first,
  93.             FA_Prop_Visible, visible,
  94.  
  95.             End
  96. ENDPROC
  97. PROC hGauge(min,max,val)
  98.    RETURN   GaugeObject,
  99.             GaugeFrame,
  100.  
  101.             FA_Horizontal,TRUE,
  102.             FA_FixedHeight,TRUE,
  103.             FA_ChainToCycle,FALSE,
  104.  
  105.             FA_Numeric_Min,min,
  106.             FA_Numeric_Max,max,
  107.             FA_Numeric_Value,val,
  108.  
  109.             End
  110. ENDPROC
  111. PROC vGauge(min,max,val)
  112.    RETURN   GaugeObject,
  113.             GaugeFrame,
  114.  
  115.             FA_ChainToCycle,FALSE,
  116.             FA_FixWidth,20,
  117.  
  118.             FA_Numeric_Min,min,
  119.             FA_Numeric_Max,max,
  120.             FA_Numeric_Value,val,
  121.  
  122.             End
  123. ENDPROC
  124.